gl renderer: Move declarations to the beginning of the block
authorTimm Bäder <mail@baedert.org>
Sat, 9 Dec 2017 15:21:19 +0000 (16:21 +0100)
committerTimm Bäder <mail@baedert.org>
Thu, 21 Dec 2017 18:12:32 +0000 (19:12 +0100)
gsk/gl/gskglrenderer.c

index c71d065641509d2fa3198cd9aa7b9e2bc76868cd..9f76a7e787a356afe749279850e2a1c38e5d1caa 100644 (file)
@@ -384,18 +384,18 @@ render_text_node (GskGLRenderer   *self,
       ops_set_texture (builder, gsk_gl_glyph_cache_get_glyph_image (&self->glyph_cache,
                                                                    glyph)->texture_id);
 
-      {
-        tx  = glyph->tx;
-        ty  = glyph->ty;
-        tx2 = tx + glyph->tw;
-        ty2 = ty + glyph->th;
+      tx  = glyph->tx;
+      ty  = glyph->ty;
+      tx2 = tx + glyph->tw;
+      ty2 = ty + glyph->th;
 
-        glyph_x = x + cx + glyph->draw_x;
-        glyph_y = y + cy + glyph->draw_y;
-        glyph_w = glyph->draw_width;
-        glyph_h = glyph->draw_height;
+      glyph_x = x + cx + glyph->draw_x;
+      glyph_y = y + cy + glyph->draw_y;
+      glyph_w = glyph->draw_width;
+      glyph_h = glyph->draw_height;
 
-        GskQuadVertex vertex_data[GL_N_VERTICES] = {
+      {
+        const GskQuadVertex vertex_data[GL_N_VERTICES] = {
           { { glyph_x,           glyph_y           }, { tx,  ty  }, },
           { { glyph_x,           glyph_y + glyph_h }, { tx,  ty2 }, },
           { { glyph_x + glyph_w, glyph_y           }, { tx2, ty  }, },